package com.java.Impl;

import com.java.Subject;
import com.java.it.Observer;

public class BinaryObserver extends Observer {
    public BinaryObserver(Subject subject) {
        this.subject=subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Brinary String:"+Integer.toBinaryString(subject.getState()));
    }
}
